package com.houweishi.module.companydocument.service.impl;

import java.util.List;
import com.houweishi.common.utils.DateUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.houweishi.module.companydocument.mapper.BizCompanyDocumentMapper;
import com.houweishi.module.companydocument.domain.BizCompanyDocument;
import com.houweishi.module.companydocument.service.IBizCompanyDocumentService;

/**
 * 文档管理Service业务层处理
 * 
 * @author houweishi
 * @date 2023-02-26
 */
@Service
public class BizCompanyDocumentServiceImpl implements IBizCompanyDocumentService 
{
    @Autowired
    private BizCompanyDocumentMapper bizCompanyDocumentMapper;

    /**
     * 查询文档管理
     * 
     * @param id 文档管理主键
     * @return 文档管理
     */
    @Override
    public BizCompanyDocument selectBizCompanyDocumentById(Long id)
    {
        return bizCompanyDocumentMapper.selectBizCompanyDocumentById(id);
    }

    /**
     * 查询文档管理列表
     * 
     * @param bizCompanyDocument 文档管理
     * @return 文档管理
     */
    @Override
    public List<BizCompanyDocument> selectBizCompanyDocumentList(BizCompanyDocument bizCompanyDocument)
    {
        return bizCompanyDocumentMapper.selectBizCompanyDocumentList(bizCompanyDocument);
    }

    /**
     * 新增文档管理
     * 
     * @param bizCompanyDocument 文档管理
     * @return 结果
     */
    @Override
    public int insertBizCompanyDocument(BizCompanyDocument bizCompanyDocument)
    {
        bizCompanyDocument.setCreateTime(DateUtils.getNowDate());
        return bizCompanyDocumentMapper.insertBizCompanyDocument(bizCompanyDocument);
    }

    /**
     * 修改文档管理
     * 
     * @param bizCompanyDocument 文档管理
     * @return 结果
     */
    @Override
    public int updateBizCompanyDocument(BizCompanyDocument bizCompanyDocument)
    {
        bizCompanyDocument.setUpdateTime(DateUtils.getNowDate());
        return bizCompanyDocumentMapper.updateBizCompanyDocument(bizCompanyDocument);
    }

    /**
     * 批量删除文档管理
     * 
     * @param ids 需要删除的文档管理主键
     * @return 结果
     */
    @Override
    public int deleteBizCompanyDocumentByIds(Long[] ids)
    {
        return bizCompanyDocumentMapper.deleteBizCompanyDocumentByIds(ids);
    }

    /**
     * 删除文档管理信息
     * 
     * @param id 文档管理主键
     * @return 结果
     */
    @Override
    public int deleteBizCompanyDocumentById(Long id)
    {
        return bizCompanyDocumentMapper.deleteBizCompanyDocumentById(id);
    }
}
